Fix check_udev in the case where udev is missing -- test's -a does not shortcut.
authorEwan Mellor <ewan@xensource.com>
Fri, 15 Dec 2006 09:50:33 +0000 (09:50 +0000)
committerEwan Mellor <ewan@xensource.com>
Fri, 15 Dec 2006 09:50:33 +0000 (09:50 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/check/check_udev

index b9ae056ce26c32dd087ff4f665fcc636cf7c1397..c84cb980297bfb3b6cb9fd445f6943ff068a269a 100755 (executable)
@@ -10,9 +10,10 @@ OpenBSD|NetBSD|FreeBSD)
        ;;
 Linux)
        TOOL="udevinfo"
+       UDEV_VERSION="0"
        test -x "$(which ${TOOL})" && \
                UDEV_VERSION=$(${TOOL} -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
-       if test -n "${UDEV_VERSION}" -a ${UDEV_VERSION} -ge 059; then
+       if test "${UDEV_VERSION}" -ge 059; then
                RC=0
        else
                TOOL="hotplug"